#include <string>

#include "fundamental.h"

using namespace Fundamental;

const RTTI Object::_rtti = { "Object", JenkinsPHF( "Object" ), NULL };

Object::Object( const std::string& name )
:	_uniqueName( name )	
,	_guid( JenkinsPHF( _uniqueName.c_str() ) )
{
}

Object::~Object()
{
}

bool Object::KindOf( const RTTI& rtti )
{
	RTTI* type = const_cast< RTTI* >( &this->GetRTTI() );
	while( type != NULL )
	{
		if( rtti.id == type->id )
		{
			return true;
		}
		type = type->parent;
	}
	return false;
}

bool Object::IsA( const RTTI& rtti )
{
	return ( this->GetRTTI().id == rtti.id );
}